<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>objectTest</h1>
<script>
function Member(){/*Member class정의*/
// 	필드를 정의 할 때는 반드시 this.를 정의 해야 함
	this.irum ='park';
	this.age = 18;
	this.address='seoul';
	this.score =90;
// setter 정의(v는 매개 변수)
	this.setIrum = function(v){this.irum =v;}
	this.setAge = function(v){this.age = v;}
	this.setAddress = function(v){this.address = v;}
	this.setScore = function(v){this.score = v;}
// 	getter 정의
	this.getIrum = function(){return this.irum;}
	this.getAge = function(){return this.age;}
	this.getAddress = function(){return this.address;}
	this.getScore = function(){return this.score;}
	
}


var m = new Member();
document.write(m.irum);

m.setIrum('kim');
document.write("<br/>new irum:"+m.getIrum());

</script>
</body>
</html>